package com.example.designpatterns.chain;

/**
 * InfoHandler类 - 处理INFO类型的请求
 */
public class InfoHandler extends Handler {
    
    public InfoHandler() {
        super("信息处理器");
    }
    
    @Override
    protected boolean canHandle(Request request) {
        return request.getType() == Request.RequestType.INFO;
    }
    
    @Override
    protected void doHandle(Request request) {
        System.out.println("信息处理器处理请求: " + request.getMessage());
        System.out.println("信息已记录到日志");
        request.setHandled(true);
    }
} 